new Vue({
    el: '#app',
    mixins: [Save],//组件配置文件，路径/utils/components.js
    data() {
        return {
            a:'123',
            dataForm: {
                Detailed_Address: ''
            },
            childDataForm: [{}],
            Enterprise_History_SerialNumber:[],
            enterprise_history:[],
            Establish_Date:[],
            city: [],//地址
            type:'0',//0:可修改  1:只读
        }
    },
    mounted() {
        /**
         * 组件配置文件中自动执行方法
         * 1.this.init(); //初始化文件
         * 2.this.getData(); //仅修改时执行，根据BOM配置属性查询
         */
        let ls_URL = window.location.href;
        this.type = getQueryObject(ls_URL, "type") || '0';
        this.getList();
     
    },
    methods:{
        getList(){
            
            $.ajax({
                url: absolutepath() + 'admin/data/dtree.json',
                type: 'GET',
                success: (data) => {
                    this.city = data;
                },
            })
             
        },
        handlePreview(file) {
            this.$emit("preview", file)
        },
        
        handleExceed() {
            this.$message({
                type: 'warning',
                message: '最大上传数:' + this.limit
            });
        },
        
        changeCity(val) {//更新省/市
            this.dataForm.ProvinceNumber = val ? (val.substring(0, 2) + '0000') : '';
            this.dataForm.CityNumber = val ? (val.substring(0, 4) + '00') : '';
            this.dataForm.Detailed_Addreass = '';
        },
        handleDate(val, item) { //处理空指针
            if (val == null) {
                item.Establish_Date = '';
            }
        }

        
    }
    
    
})